package test;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by steve
 * 2018/7/16
 */
public class Hello {
    public static void main(String args[]){
        System.out.println("hello");

        int results[] = {1, 2, 3};

        for (int item: results){
            System.out.println(item);
        }

        Hello hello = new Hello();
        hello.pupAge();

    }

    public void pupAge(){
        int age = 0;
        age = age + 7;
        System.out.println("小狗的年龄是: " + age);

        char res[] = {'a', 'd', 'e', 'f'};
        String tt = String.valueOf(res);
        System.out.println(tt);

        StringBuffer stringBuffer = new StringBuffer("website is: ");
        stringBuffer.append("www.jd.com");
        System.out.println(stringBuffer + " " + stringBuffer.capacity());
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
        System.out.println("time is " + date.toString() + ", another " + date.getTime() + ", time " + format.format(date));
    }
}
